package net.huashitong.scheduling.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.scheduling.entity.Yearbooks;
import net.huashitong.scheduling.filter.YearbooksFilter;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class YearbooksDao extends StringDao<Yearbooks> {
     public List<Yearbooks> queryYearbooksByDate(YearbooksFilter filter){
         GenericQuery query = createQuery("obj");
         query.append(" and date = :date order by cast(obj.sysId as int) asc ").setParam("date",filter.getDate());
         return query.listResult();
     }
}
